![]() |
FontMetrics |
||||
Header: | Fonts.h | Carbon status: | Supported | |
Gets fractional measurements for the font, size, and style specified in the current graphics port.
void FontMetrics ( FMetricRecPtr theMetrics );
A pointer to a font metrics structure that contains the font measurement information, in fractional values.
The FontMetrics function returns measurements for the ascent, descent, leading, and width of the largest glyph in the font for the font, size, and style specified in the current graphics port. FontMetrics returns this information in a font metrics structure.
The font metrics structure (of data type FMetricRec) contains a handle to the global width table, which in turn contains a handle to the associated font family resource for the current font (the font in the current graphics port). It also contains the values of four measurements for the current font.
The FontMetrics function is similar to QuickDraw’s GetFontInfo function, except that FontMetrics returns fractional values for greater accuracy in high-resolution printing. FontMetrics also does not take into account any additional widths that are added by QuickDraw when it applies styles to the glyphs in a font.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)